<include file="public@header"/>
<link rel="stylesheet" href="__HST__/layui/css/layui.css">
</head>
<body>
<div class="wrap js-check-wrap">
	<blockquote class="layui-elem-quote">用户信息</blockquote>
	<form class="layui-form" action="">
		<div class="layui-inline">
			<label class="layui-form-label"><strong>用户</strong></label>
			<div class="layui-input-block">
				<input type="text" name="title" value="{$userInfo['name']}" readonly autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label"><strong>级别</strong></label>
			<div class="layui-input-block">
				<input type="text" name="title" value="{$userInfo['cell']}" readonly autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label"><strong>底薪</strong></label>
			<div class="layui-input-block">
				<input type="text" name="title" value="{$userInfo['base_money']}" readonly autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-form-label"><strong>收益率</strong></label>
			<div class="layui-input-block">
				<input type="text" name="title" value="{$userInfo['bonus']*100}%" readonly autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-inline">
			<label class="layui-input-block"><span style="color:red;">注:收益=底薪+总金额x级别收益率</span></label>
		</div>

	</form>

	<blockquote class="layui-elem-quote">年/月</blockquote>
	<ul class="nav nav-tabs">
		<foreach name="years" item="vo">
			<if condition="$vo['year'] eq $year">
				<li style="background-color: #1dccaa"><a href="javascript:;">{$vo['year']}</a></li>
				<else/>
				<li><a href="{:url('Consumes/index', array('id'=>$userInfo['id'], 'year'=>{$vo['year']}))}">{$vo['year']}</a></li>
			</if>
		</foreach>
		<form action="{:url('consumes/index')}" method="post" class="form-inline">
			<input type="hidden" name="id" value="{$userInfo['id']}">
			<input type="text" style="margin-left: 15px;" class="form-control" style="width: 200px;" name="year" value="{$year|default=''}">
			<input type="submit" class="btn btn-primary" value="查看">
		</form>
	</ul>

	<table class="layui-table">
		<tr>
			<foreach name="moths" item="vo">
				<eq name="$vo['moth']" value="7"></tr><tr></eq>
				<if condition="$vo['moth'] eq $moth">
					<td style="background-color: #1dccaa;width: 16.6%;"><a style="text-decoration:none;" href="javascript:;">
						{$vo['moth']}月<if condition="isset($vo['total_money'])">份总收益{$vo['total_money']|default=''|round='2'}元</if></a>
					</td>
					<else/>
					<td><a style="text-decoration:none;width: 16.6%;" href="{:url('Consumes/index', array('id'=>$userInfo['id'], 'year'=>$year, 'moth'=>$vo['moth']))}">
						{$vo['moth']}月<if condition="isset($vo['total_money'])">份总收益{$vo['total_money']|default=''|round='2'}元</if></a>
					</td>
				</if>
			</foreach>
		</tr>
	</table>

	<blockquote class="layui-elem-quote">消费列表</blockquote>
	<form class="js-ajax-form" action="" method="post">
		<table class="table table-hover table-bordered table-list">
			<thead>
			<tr>
				<th>日期</th>
				<th>商品</th>
				<th>用户名</th>
				<th width="50">性别</th>
				<th width="65">手机号</th>
				<th>消费金额</th>
				<th>收益率</th>
				<th>收益</th>
				<th>本月底薪</th>
			</tr>
			</thead>
			<foreach name="list" item="vo">
				<tr>
					<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
					<td>{$vo.goods_name}</td>
					<td width="90">
						{$vo.name}
					</td>
					<td>
						<if condition="$vo.sex eq 1">
							男
							<else/>
							女
						</if>
					</td>
					<td>{$vo.phone}</td>
					<td>{$vo.money}元</td>
					<td>{$vo.bonus*100}%</td>
					<td>{$vo.money*$vo.bonus}元</td>
					<td>{$vo.base_money}元</td>
				</tr>
			</foreach>
		</table>
		<ul class="pagination">{$page|default=''}</ul>
	</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script src="__HST__/layui/layui.js"></script>
</body>
</html>